package com.sky.controller.admin;

import com.sky.dto.OrdersCancelDTO;
import com.sky.dto.OrdersPageQueryDTO;
import com.sky.result.Result;
import com.sky.service.OrderAdminService;
import com.sky.vo.OrderVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/order")
public class OrderAdminController {
    @Autowired
    OrderAdminService orderAdminService;

    /**
     * 取消订单
     * @param ordersCancelDTO
     * @return
     */
    @ApiOperation("订单取消")
    @PutMapping("cancel")
    public Result cancel(@RequestBody OrdersCancelDTO ordersCancelDTO){
        orderAdminService.cancel(ordersCancelDTO);
        return Result.success();
    }
}
